Skip to content

Splitter - set initial size for collapsed panels#32975

Open
dmlvr wants to merge 5 commits intoDevExpress:26_1from
dmlvr:26_1_2200_splitter_set_initial_size_for_collapsed_panels
Open

Splitter - set initial size for collapsed panels#32975
dmlvr wants to merge 5 commits intoDevExpress:26_1from
dmlvr:26_1_2200_splitter_set_initial_size_for_collapsed_panels

Conversation

@dmlvr
Copy link
Contributor

@dmlvr dmlvr commented Mar 19, 2026

No description provided.

@dmlvr dmlvr self-assigned this Mar 19, 2026
@dmlvr dmlvr requested a review from a team as a code owner March 19, 2026 13:48
@dmlvr dmlvr added the 26_1 label Mar 19, 2026
Copilot AI review requested due to automatic review settings March 19, 2026 13:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the internal Splitter sizing logic so panes that start in collapsed: true can restore their initially configured size when expanded, and adds/adjusts QUnit coverage in the Splitter widget test suite.

Changes:

  • Capture configured size for initially-collapsed panes and use it when calculating the expand delta (instead of always expanding to “half of neighbor”).
  • Export Splitter CSS class constants from the internal implementation and reuse them in tests.
  • Add new QUnit tests covering size restoration for initially-collapsed panes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
packages/devextreme/js/__internal/ui/splitter/splitter.ts Captures initial sizes for collapsed panes and uses them on first expand; exports internal CSS class constants.
packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.tests.js Imports internal CSS class constants; adds tests for restoring configured size after expanding initially-collapsed panes.

You can also share your feedback on Copilot code review. Take the survey.

Copilot AI review requested due to automatic review settings March 23, 2026 09:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Splitter’s collapse/expand sizing logic so panes that start in a collapsed state can restore their configured initial size when expanded, and extends the widget’s test coverage for this scenario.

Changes:

  • Track the configured size for initially-collapsed panes via an internal _initialSizeBeforeCollapse field and use it when expanding.
  • Refactor expand target-size calculation into _getTargetPaneSize.
  • Update Splitter tests to use exported CSS class constants and add new test cases for initial collapsed-size restoration.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/devextreme/js/__internal/ui/splitter/splitter.ts Captures initial configured size for collapsed panes and uses it to compute expansion target size; exports Splitter CSS class constants.
packages/devextreme/testing/tests/DevExpress.ui.widgets/splitter.tests.js Imports Splitter CSS constants from the internal module and adds tests verifying restore behavior for initially-collapsed panes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants